Mega Code Archive

Categories
1) Android
2) ASP.Net
3) ASP.Net Tutorial
4) C
5) C Tutorial
6) C#
7) C# Book
8) C# by API
9) C# Tutorial
10) C++
11) C++ Tutorial
12) Delphi
13) Flash ActionScript
14) Flex
15) Java
16) Java Book
17) Java by API
18) Java Tutorial
19) JavaScript DHTML
20) JavaScript Reference
21) JavaScript Tutorial
22) MSOfficeExcel 2007 Tutorial
23) MSOfficePowerPoint 2007 Tutorial
24) MSOfficeWord 2007 Tutorial
25) MSSQL
26) MSSQL Tutorial
27) MySQL
28) MySQL Tutorial
29) Oracle PLSQL
30) Oracle PLSQL Tutorial
31) Perl
32) Php
33) PostgreSQL
34) Python
35) Python Tutorial
36) Ruby
37) Silverlight
38) VB.Net
39) VB.Net by API
40) VB.Net Tutorial
41) Visual C++ .NET
42) VisualBasic Script
43) XML
44) XML Tutorial
 
Java
1) 2D Graphics GUI
2) 3D Graphics
3) Advanced Graphics
4) Ant
5) Apache Common
6) Applet
7) Awt
8) Beginners Lab
9) Chart
10) Class
11) Collections Data Structure
12) Core
13) Data Type
14) Database SQL JDBC
15) Date Time
16) Design Pattern
17) Development Class
18) EJB3
19) Email
20) Event
21) File Input Output
22) Game
23) Generics
24) GWT
25) Hibernate
26) Internationalization
27) J2EE
28) J2ME
29) JDBC
30) JDK
31) JNDI LDAP
32) JPA
33) JSP
34) JSTL
35) Language Basics
36) Learning
37) Mathematics
38) Network Protocol
39) PDF RTF
40) Reflection
41) Regular Expressions
42) Scripting
43) Security
44) Servlets
45) Session
46) Sound
47) Spring
48) Swing Components
49) Swing JFC
50) SWT Jface Eclipse
51) Threads
52) Tiny Application
53) Util
54) Velocity
55) Web Services SOA
56) XML
Language Basics
1) #define the properties for the SocketHandler
2) A class helper for logging service
3) A collection of utility methods for manipulating exceptions
4) A file handler that appends
5) A frame with a panel for testing various exceptions
6) A JTable subclass that displays a table of the JavaBeans properties of any specified class
7) A list of bits
8) A marker annotation
9) A modification of the image viewer program that logs various events
10) A Program with Assertions
11) A simple wrapper around JDK logging facilities
12) A single member annotation
13) Abstract classes and methods
14) Alternate XML by using FileHandler
15) An annotation type declaration
16) An annotation type declaration 2
17) An annotation type declaration and include defaults
18) An assertion utility just for simple checks
19) An enumeration of apple varieties
20) An example of a program providing the functionality of logging
21) And assign level and appender to your own logger
22) Annotation Demo
23) Annotation Viewer
24) Arithmatic Assignment Operators
25) Arithmetic Operators Example
26) Assert Util
27) Assert with an informative message
28) Assertion utility class that assists in validating arguments
29) Basic Logging Example
30) BeanContext Child Support
31) BeanContext Support
32) Binary Digits
33) Bit-level unpacking of floating-point data
34) Bitwise AND (&)
35) Bitwise complement (~)
36) Bitwise Demo
37) Bitwise OR ()
38) Bitwise XOR (^)
39) Break Demo
40) Break With Label Demo
41) Catch assert exception with message
42) Catching exception hierarchies
43) Check out for loop
44) Class for checking syntax and comments for the assert
45) Class Hierachy
46) Class to represent unsigned 32-bit numbers
47) ClassLoader that is composed of other classloaders
48) ClassLoader util for loading classes and finding resources
49) Clears a range of bits in the specified integer
50) Close stream in finally
51) Comma Operator
52) Comments demo
53) Comparing Log Levels
54) Config Demo
55) Config properties
56) Configure Logging
57) Configuring Logger Default Values with a Properties File
58) Continue Demo
59) Continue With Label Demo
60) Convert a number to negative and back
61) Convert an exception to a String with full stack trace
62) Convert double to string
63) Convert int to string
64) Convert string to double
65) Convert string to int
66) Convert the result of Exception getStackTrace to a String
67) Convert Throwable to string
68) Convert varargs to an array
69) Converting Between a BitSet and a Byte Array
70) Create a memory handler with a memory of 100 records and dumps the records into the file my log
71) Create a method that accept varargs in Java
72) Create a new Exception, setting the cause if possible
73) Create a new RuntimeException, setting the cause if possible
74) Create log with package name
75) Creates all of the objects, a tests the service capabilities
76) Creating a Custom Formatter for a Logger Handler
77) Creating a Custom Log Level
78) Custom filter
79) Declare multiple variables in for loop
80) Define a named logger
81) Define the appender named CONSOLE
82) Define the appender named FILE
83) Define the constant
84) Define the root logger with two appenders writing to console and file
85) Define your own Custom Formatter
86) Demonstrate a field-width specifier
87) Demonstrate how finalize() methods and shutdownHooks interact
88) Demonstrate the format specifier
89) Demonstrate the format specifiers 2
90) Demonstrate variable length arguments
91) Demonstrates break and continue keywords
92) Demonstrates exception chaining
93) Demonstrates for loop by listing all the lowercase ASCII letters
94) Demonstrates short-circuiting behavior with logical operators
95) Demonstrates the switch statement
96) Demonstrates the while loop
97) Demonstrating fillInStackTrace()
98) Demonstrating the Exception Methods
99) Demonstration of a ClassLoader
100) Demonstration of set functionality in beans
101) Detect evenodd number with the modulus operator
102) Determining If a Message Will Be Logged
103) Determining When the Logging Configuration Properties are Reread
104) Display hashCodes from some objects
105) Display Stack Trace Information with StackTraceElement
106) Do While
107) Do While Demo
108) Doclet Example
109) Doclet that prints out all members of the class
110) Email Logger
111) Enabling Assertions from the Command Line
112) Ensuring proper cleanup
113) Enum and Generic
114) Enum with switch statement
115) Example log4j Configuration File
116) Exception Catcher
117) Exception Helper
118) Exception in main method
119) Exception Util
120) Experience exceptions
121) Extending an interface with inheritance
122) File Logger
123) Finally is always executed
124) Find out whether interfaces are inherited
125) Finding Out of what Class an Object is Instantiated
126) Flush File Handler and Logger
127) For Demo
128) For loop
129) Foreach and generic data structure
130) Foreach Array
131) Formatted Input output
132) Formatting time and date
133) Free Flowing Switch Statement Example
134) Further embellishment of exception classes
135) Fuses the lower 16 bits of two ints
136) Get a class of an object
137) Get Deepest Throwable
138) Get stack trace and cause exception
139) Get Stack Trace Element
140) Get the stack trace of the supplied exception
141) Gets the a single bit of the target
142) Gets the specified bit (0-31) from the integer argument
143) Getting the Stack Trace of an Exception
144) Handling an Assertion Error
145) Handling Errors While Parsing an XML File
146) Hash code
147) Hierarchy 2
148) Holds a sequence of Objects
149) How an exception can be lost
150) How do I mark method as deprecated
151) create Java bean component
152) use enum
153) use the instantiateChild() convenience method to create a bean automatically nested into a bean context
154) write Comments
155) write custom Log handler
156) Html properties
157) If Else
158) If Else 2
159) If Else Demo
160) If statement
161) If statement demo
162) Ignoring RuntimeExceptions
163) Illustrate delivery of the BeanContextMembershipEvent
164) Illustrate various Exceptions
165) Implement multiple interfaces
166) Increment and Decrement Operators
167) Infinite For loop Example
168) Inheriting your own exceptions
169) Initializing interface fields with non-constant initializers
170) Insert an annotation to suppress warning
171) Interface Collision
172) Interface Usage Example
173) Java Annotation
174) Java Annotation Tester
175) Java enum
176) Java enum and varargs
177) Java for In(forin) Tester
178) Java for in (forin)
179) Java for in (forin) with Collection
180) Java for in (forin) with generic Collection
181) Java formatted IO
182) Java Formatter
183) Java labeled for loop
184) Java labeled while loop
185) Java Log
186) Java new formatted IO
187) Java program to demonstrate looping
188) Java program to demonstrate looping 1
189) Java static import
190) Java static import enum
191) Java varargs
192) Java Varargs Tester
193) Jdbc properties configuration file for log4j
194) Jms properties configuration file for JMS
195) Labelled breaks breaks out of several levels of nested loops inside a pair of curly braces
196) Left shift ()
197) Limiting the Size of a Log by Using a Rotating Sequence of Files
198) Limiting the Size of a Log File
199) Localized Logging
200) Locates a particular type of exception
201) Log Client Filter
202) Log HTML Table Formatter
203) Log level
204) Log multiple Handlers
205) Log multiple Handlers 2
206) Log To File with FileHandler
207) Log to file with FileHandler and SimpleFomatter
208) Log4j
209) Log4j config file
210) Log4j Configuration File
211) Log4j properties
212) Logger Demo
213) Logger with XMLFormatter and FileHandler
214) Logging a Method Call
215) Logging an Exception
216) Logging Example 1
217) Logging Level Manipulation
218) Logging Levels
219) Logging Servlet with log4j
220) Logging Thread
221) Logging Thread Pool
222) Make a string representation of the exception
223) Media enumeration constants
224) Memory Handler Demo
225) Minimizing the Impact of Logging Code
226) Modulus Operator Example
227) Multi Super Interfaces
228) Multiple expressions in for loops
229) Multiple interfaces
230) Nested Switch Statements Example
231) New parameter for main method
232) Non-informative style of assert
233) Nt properties for NT configuration
234) Obtains all property descriptors from a bean (interface or implementation)
235) Old style
236) Overridden methods may throw only the exceptions
237) Override Annotation Tester
238) Override LogRecord toString()
239) Pass the configuration file and configuration class
240) Performing Bitwise Operations on a Bit Vector
241) Preventing a Logger from Forwarding Log Records to Its Parent
242) Print all of the threads information and stack traces
243) Prints the stack trace of the specified throwable to a string and returns it
244) Put printStackTrace() into a String
245) Recommended Program Layout Style
246) Remote ConfigReader with URLConnection
247) Rethrow a different object from the one that was caught
248) Return a message for logging
249) Return stack trace from the passed exception as a string
250) Returns 16 bits from the long number
251) Returns a byte array of at least length 1
252) Returns the output of printStackTrace as a String
253) Returns the root cause of an exception
254) Right shift
255) Runs a jar application from any url
256) Search an array using foreach(for each) style for
257) Set the appender named testAppender to be a console appender
258) Set the cause of the Exception Will detect if this is not allowed
259) Set the layout for the appender testAppender
260) Set the level of the root logger to DEBUG and set its appender as an appender named testAppender
261) Sets a specific bit of an int
262) Sets the specified bit (0-31) in the integer argument
263) Setting a Filter on a Logger Handler
264) Setting the Formatter of a Logger Handler
265) Shift to the left
266) Shift to the left three
267) Show all annotations for a class and a method
268) Show some effects of shifting on ints and longs
269) Shuffler Enum
270) Sign shift to the right
271) Signed shift to the right
272) Simple annotation
273) Simple demo of exceptions
274) Simple demo of exceptions, with finally clause
275) Simple demo to print all the types of an enum
276) Simple Java bean container
277) Simple Log Formatter Example
278) Smtp properties for EMail based logging
279) Socket Handler Demo
280) StackTrace
281) Static Import
282) Static import user defined static fields
283) Stream Handler
284) String Hash Code
285) Suppress warning in ANT script
286) SuppressWarnings Annotation Tester
287) Switch Demo
288) Switch Demo 2
289) Switch demo with empty case statement
290) SwitchDemo 2
291) Switching on Enum and Adding Methods to an Enum
292) Ternary operator Demo
293) Test case for finally, to show its effect with return or exit
294) Test of unsigned right shift
295) The difference between instanceof and class
296) The finally clause is always executed
297) The foreach(for each) loop is essentially read-only
298) The Patterns in FileHandler
299) The Quintessential Logging Program
300) This class shows how we might control the objects
301) This program demonstrates enumerated types
302) This shows that a class implementing an interface need not
303) ThreadBasedCatcher - Demonstrate catching uncaught exceptions
304) Throw Exception Out
305) Turning off Checked exceptions
306) Two ways that a class can implement multiple interfaces
307) UnSign shift to the right
308) Unsigned shift to the right
309) Use a foreach(for each) style for loop
310) Use an enum constructor
311) Use an enum constructor, instance variable, and method
312) Use arguments indexes to simplify the creation of a custom time and date format
313) Use assert the verify value
314) Use break with a foreach(for each) style for
315) Use foreach(for each) style for on a two-dimensional array
316) Use Logger with simple formatter and FileHandler
317) Use Override annotation
318) Use Scanner to compute an average a list of comma-separated values
319) Use Scanner to read various types of data from a file
320) Use static import to bring sqrt() and pow() into view
321) Use the built-in enumeration methods
322) Use varargs with standard arguments
323) Uses a do-while loop to get this input from the user
324) Using a foreach(for each) for loop on an Iterable object
325) Using a foreach(for each) for loop with a collection
326) Using finalize() to detect an object that hasnt been properly cleaned up
327) Using Regular Expressions based on StreamHandler
328) Using the bitwise operators
329) Using the class loader to enable assertions
330) Utility class to work with throwables
331) Utility for byte swapping of all java data types
332) Utility methods for dealing with stack traces
333) Varargs and overloading
334) VarArgs Example
335) Varargs, overloading, and ambiguity
336) Various Class Loader utilities
337) What happens if a method declares an unchecked exception
338) What is SuppressWarnings annotation
339) While Demo
340) Window Handler
341) Writing Log Records Only After a Condition Occurs
342) Writing Log Records to a Log File
343) Writing Log Records to Standard Error
344) Xml properties
345) XMLFormatter based Logging
346) Your own Exception class